

#ifndef UC_GESURF_H
#define UC_GESURF_H

#include "zgeent3d.h"
#include "zgevc3dar.h"
#pragma pack (push, 8)

class UcGePoint2d;
class UcGeCurve3d;
class UcGePointOnCurve3d;
class UcGePointOnSurface;
class UcGePointOnSurfaceData;
class UcGeInterval;

class
GE_DLLEXPIMPORT
UcGeSurface : public UcGeEntity3d
{
public:

    UcGePoint2d     paramOf        (const UcGePoint3d& pnt,
                                    const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean  isOn           (const UcGePoint3d& pnt,
                                    const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean  isOn           (const UcGePoint3d& pnt, UcGePoint2d& paramPoint,
                                    const UcGeTol& tol = UcGeContext::gTol ) const;

    UcGePoint3d closestPointTo(const UcGePoint3d& pnt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    void getClosestPointTo(const UcGePoint3d& pnt, UcGePointOnSurface& result,
                           const UcGeTol& tol = UcGeContext::gTol) const;
	
    double          distanceTo     (const UcGePoint3d& pnt,
                                    const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean  isNormalReversed () const;
    UcGeSurface&    reverseNormal    ();

    UcGeSurface&    operator =     (const UcGeSurface& otherSurface);

    void   getEnvelope  (UcGeInterval& intrvlX, UcGeInterval& intrvlY) const;

    ZSoft::Boolean isClosedInU       (const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isClosedInV       (const UcGeTol& tol = UcGeContext::gTol) const;

    UcGePoint3d   evalPoint   (const UcGePoint2d& param) const;
    UcGePoint3d   evalPoint   (const UcGePoint2d& param, int derivOrd,
                               UcGeVector3dArray& derivatives) const;
    UcGePoint3d   evalPoint   (const UcGePoint2d& param, int derivOrd,
                               UcGeVector3dArray& derivatives,
                               UcGeVector3d& normal) const;
protected:
    UcGeSurface ();
    UcGeSurface (const UcGeSurface&);
};

#pragma pack (pop)
#endif
